package com.oauth.service;

import org.apache.oltu.oauth2.common.exception.OAuthProblemException;
import org.apache.oltu.oauth2.common.exception.OAuthSystemException;
import org.apache.oltu.oauth2.common.token.BasicOAuthToken;

/**
 * Created by yangjianbo on 2016/9/29.
 */
public interface OauthTokenService {

    BasicOAuthToken tokenByCode(String client_id,String client_secret,String code,String redirec_uri,String scope) throws OAuthProblemException, OAuthSystemException;

    BasicOAuthToken tokenByClient(String client_id,String client_secret,String scope) throws OAuthProblemException, OAuthSystemException;

    BasicOAuthToken tokenByPassword(String client_id,String client_secret,String username,String password,String scope) throws OAuthProblemException, OAuthSystemException;

    BasicOAuthToken tokenByRefresh(String refresh_token,String scope) throws OAuthProblemException, OAuthSystemException;

    Boolean isEnable(String token,String resoure) throws OAuthProblemException;


}
